﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zero.POCO.Helper;

namespace Zero.POCO
{
    public static class AnnonceurFactory
    {
        /// <summary>
        /// Factory method to create an annonceur
        /// </summary>
        /// <param name="name">the name of the annonceur</param>
        /// <returns>an annonceur</returns>
        public static Annonceur CreateAnnonceur(string name=null)
        {
            return name == null ? new Annonceur { id = Guid.NewGuid(), Marques = new List<Marque>() } : new Annonceur() { Name = name, id = new Guid(), Marques = new List<Marque>() };
        }

        /// <summary>
        /// Factory method to create a marque
        /// </summary>
        /// <param name="name">the name of the marque</param>
        /// <param name="annonceur">the owner of the marque </param>
        /// <param name="type"> the segement in wich operate the marque </param>
        /// <returns>a marque </returns>
        public static Marque CreateMarque(String  name, TypeMarque type)
        {
            return new Marque() { Name = name, Type = type, id = Guid.NewGuid() };
        }
    }
}
